using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;

namespace Weever.Json.Binding
{
    class JsonDispatchMessageFormatter: IDispatchMessageFormatter//, IClientMessageFormatter
    {
        private IDispatchMessageFormatter _innerDispatchFormatter;
        
        internal JsonDispatchMessageFormatter(IDispatchMessageFormatter dispatchFormatter)
        {
            _innerDispatchFormatter = dispatchFormatter;
        }
        
        public void DeserializeRequest(Message message, object[] parameters)
        {
            _innerDispatchFormatter.DeserializeRequest(message, parameters);
        }

        public Message SerializeReply(MessageVersion messageVersion, object[] parameters, object result)
        {
            return _innerDispatchFormatter.SerializeReply(messageVersion, parameters, result);
        }
    }
}
